/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function ajaxRequest(callBackFunction, request){
    var xmlHttpRequest = new XMLHttpRequest();
    
    xmlHttpRequest.onreadystatechange=function()
    {
        if (xmlHttpRequest.readyState==4 && xmlHttpRequest.status==200)
        {
            //return xmlHttpRequest.responseText;
            if (callBackFunction!=null)
                callBackFunction(xmlHttpRequest.responseText);
        //element.innerHTML = xmlHttpRequest.responseText;
        }
    }
    //xmlHttpRequest.open("GET","?req=updateTable",true);
    xmlHttpRequest.open("GET",request,true);
    xmlHttpRequest.send();
    
    
}